package com.lm.activiti.boot.dto;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

@SuppressWarnings("serial")
public class ExifUnionAttenSwipingDto extends BaseBizDto implements Serializable {
	private String bizType;
	private String cardNo;
	private String deviceId;
	private String attenTime;
	private String attenType;
	private String thrUserId;//非必填
	
	private Integer userId;//非必填
	private Integer userType;//非必填
	private String attenPic;//非必填
	private String attenPicStr;//图片地址的base64字符串-非必填
	private String token;
	private Integer isUpdatePic;//是否是更新图片
	public final static Integer IS_UPDATE_PIC_TURE = 1;
	private String stuNo;//学生学号
	private String idCard;//身份证
	private Integer schoolId;
	
	/**模拟打卡时使用 1:代表模拟打卡 0或不传则是真实流水数据*/
	private Integer realFlag;
	/**事务流水 id 可用于标识关联事务*/
	private String transid;
	/**识别方式 识别方法：0:其他1:刷卡2:人脸*/
	private Integer identifyMethod;

	private String attenAddress;//打卡地点
	
	private Integer result;//打卡结果， 1成功 2 失败
	
	private String failMsg;//失败原因
	
	public String getBizType() {
		return bizType;
	}
	public void setBizType(String bizType) {
		this.bizType = bizType;
	}
	public String getCardNo() {
		return cardNo;
	}
	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}
	public String getDeviceId() {
		return deviceId;
	}
	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	public String getAttenTime() {
		return attenTime;
	}
	public void setAttenTime(String attenTime) {
		this.attenTime = attenTime;
	}
	public String getAttenType() {
		return attenType;
	}
	public void setAttenType(String attenType) {
		this.attenType = attenType;
	}

	public String getToken() {
		return token;
	}
	public void setToken(String token) {
		this.token = token;
	}
	
	public String getThrUserId() {
		return thrUserId;
	}
	public void setThrUserId(String thrUserId) {
		this.thrUserId = thrUserId;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Integer getUserType() {
		return userType;
	}
	public void setUserType(Integer userType) {
		this.userType = userType;
	}
	
	public String getAttenPic() {
		return attenPic;
	}
	public void setAttenPic(String attenPic) {
		this.attenPic = attenPic;
	}
	
	public String getAttenPicStr() {
		return attenPicStr;
	}
	public void setAttenPicStr(String attenPicStr) {
		this.attenPicStr = attenPicStr;
	}
	
	public Integer getIsUpdatePic() {
		return isUpdatePic;
	}
	public void setIsUpdatePic(Integer isUpdatePic) {
		this.isUpdatePic = isUpdatePic;
	}
	
	public String getStuNo() {
		return stuNo;
	}
	public void setStuNo(String stuNo) {
		this.stuNo = stuNo;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public Integer getRealFlag() {
		return realFlag;
	}

	public void setRealFlag(Integer realFlag) {
		this.realFlag = realFlag;
	}

	public String getTransid() {
		return transid;
	}

	public void setTransid(String transid) {
		this.transid = transid;
	}

	public Integer getIdentifyMethod() {
		return identifyMethod;
	}

	public void setIdentifyMethod(Integer identifyMethod) {
		this.identifyMethod = identifyMethod;
	}

	public String getAttenAddress() {
		return attenAddress;
	}
	public void setAttenAddress(String attenAddress) {
		this.attenAddress = attenAddress;
	}
	public static Integer getIsUpdatePicTure() {
		return IS_UPDATE_PIC_TURE;
	}
	public Integer getResult() {
		return result;
	}
	public void setResult(Integer result) {
		this.result = result;
	}
	public String getFailMsg() {
		return failMsg;
	}
	public void setFailMsg(String failMsg) {
		this.failMsg = failMsg;
	}
	
	public Integer getSchoolId() {
		return schoolId;
	}
	public void setSchoolId(Integer schoolId) {
		this.schoolId = schoolId;
	}
	public String genrHcStr(String appkey) {
		// 按字段字母排序
		StringBuilder sb=new StringBuilder();
		sb.append(this.appcode);
		sb.append(appkey);
		sb.append(attenTime);
		if(StringUtils.isNotBlank(bizType)){
			sb.append(this.bizType);
		}
		if(StringUtils.isNotBlank(cardNo)){
			sb.append(cardNo);
		}
		sb.append(deviceId);
		if(StringUtils.isNotBlank(stuNo)){
			sb.append(stuNo);
		}
		sb.append(this.timestamp);
		return sb.toString();
	}
}
